#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
const int ArraySize = 1e3 + 10;
ll a[ArraySize];
const int fx[] = {0, -2, -1, 1, 2, 2, 1, -1, -2};
const int fy[] = {0, 1, 2, 2, 1, -1, -2, -2, -1};
ll f[40][40];
bool s[40][40];
void solve()
{
    ll bx, by, mx, my;
    cin >> bx >> by >> mx >> my;
    bx += 2, by += 2, mx += 2, my += 2;
    f[2][1] = 1;
    s[mx][my] = 1;
    for (int i = 1; i <= 8; i++)
        s[fx[i] + mx][fy[i] + my] = 1;
    for (int i = 2; i <= bx; i++)
        for (int j = 2; j <= by; j++)
        {
            if (s[i][j] == 1)
                continue;
            // if (i == 2 && j == 2)
            //     f[i][j] = 1;
            // else
            f[i][j] = f[i - 1][j] + f[i][j - 1];
        }
    cout << f[bx][by];
}
int main()
{

    solve();
    return 0;
}
